<?php
class Application_Form_LoginForm extends Zend_Form
{
    public function __construct($options = null) 
    {
        parent::__construct($options);
        $this->generate();
    }

    private function generate() 
    {

    $this->setName('Login');

        $username = new Zend_Form_Element_Text('username');

        $username->setLabel('Username')
            ->setRequired(true)
            ->addFilter('StripTags')
            ->addValidator('NotEmpty');

        $password = new Zend_Form_Element_Password('senha');
        $password->setLabel('Senha')
            ->setRequired(true)
            ->addFilter('StripTags')
            ->addValidator('NotEmpty');

        $submit = new Zend_Form_Element_Submit('submit_login');
        $submit->setLabel('Entrar');
        $submit->setAttrib('id', 'Entrar');
        $this->addElements(array($username, $password, $submit));
        $this->setMethod('post');
    }
}